type father = {
    name: string
    age: number
}

type son = {
    name: string
}

type res = father extends son ? true : false

function getNames<T extends { name: string }>(entities: T[]):string[] {
    return entities.map(entity => entity.name)
}

getNames([{name: 'kaho'}])